//因为JQuery的序列化方法不包含禁用的元素，这里加了个1方法，包含禁用元素
var r20 = /%20/g,
rbracket = /\[\]$/,
rCRLF = /\r?\n/g,
rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
rsubmittable = /^(?:input|select|textarea|keygen)/i;
var rcheckableType = ( /^(?:checkbox|radio)$/i );
jQuery.fn.extend( {
	serialize1: function() {
		return jQuery.param( this.serializeArray1() );
	},
	serializeArray1: function() {
		return this.map( function() {
			// Can add propHook for "elements" to filter or add form elements
			var elements = jQuery.prop( this, "elements" );
			return elements ? jQuery.makeArray( elements ) : this;
		} )
		.filter( function() {
			var type = this.type;

			// Use .is(":disabled") so that fieldset[disabled] works
//			return this.name && !jQuery( this ).is( ":disabled" ) &&
//				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
//				( this.checked || !rcheckableType.test( type ) );
			
			// 上面有一个判断就是有关禁用元素的，!jQuery( this ).is( ":disabled" ) 
			return this.name &&
			rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
			( this.checked || !rcheckableType.test( type ) );
		} )
		.map( function( i, elem ) {
			var val = jQuery( this ).val();

			return val == null ?
				null :
				jQuery.isArray( val ) ?
					jQuery.map( val, function( val ) {
						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
					} ) :
					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
		} ).get();
	}
} );
